<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>银行卡更换记录</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="format-detection" content="telephone=no">
    <link rel="stylesheet" href="/plugins/layui/css/layui.css" media="all" />
</head>
<body class="childrenBody">
<div class="layui-form news_list">
	<table class="layui-table" id="changeLogList" lay-filter="changeLogs"></table>
</div>

<!--一般情况下，一个业务页面引入一个layui.js和业务js这两个两个js就够了-->
<!-- <script type="text/javascript" src="../../../lib/layui/layui.js"></script> -->
<script type="text/javascript" src="/js/jquery-1.11.2.min.js"></script>
<script type="text/javascript" src="/plugins/layui/layui.js"></script>
<!-- <script type="text/javascript" src="editMenu.js"></script> -->
<script type="text/javascript">
layui.config({
    base: '/js/admin/'
}).extend({
    ajaxExtention: 'ajaxExtention',//加载自定义扩展，每个业务js都需要加载这个ajax扩展
    $tool: 'tool'
}).use(['table', 'layer', 'jquery', 'ajaxExtention', '$tool','upload'], function () {
    var table = layui.table,
        layer = parent.layer === undefined ? layui.layer : parent.layer,
        $ = layui.jquery,
        $tool = layui.$tool;
    var queryArgs = $tool.getQueryParam();//获取查询参数
    var id = queryArgs['id'];
    var tabledata=[];
    $.ajax({
        url:'/merchants/getBCLogForCurrentMerchant/'+id,
        method:"GET",
		async:false,
        success:function (data) {
            data.data.forEach(function (t) {
                tabledata.push(t);
            })
            console.log(tabledata)
        }
    });
   	var tableIns =table.render({
        elem: '#changeLogList'
        ,data: tabledata
        ,cols: [[
            {checkbox: true}
            ,{field:'oldCardcode', title:'旧银行卡号'}
            ,{field:'newCardcode', title:'新银行卡号'}
            ,{field:'createTime', title: '创建时间',
                templet:function(d){
                    if(d.createTime!=null){
                        return $tool.formatTime(d.createTime);
                    }else{
                        return "---"
                    }
                }
			}
        ]]
        ,id: 'testReload'
        ,page: true
    });


});

</script>
</body>
</html>

